define(function(require, exports){
	var $ = require('jquery');
	var pubjs = require('pubjs');
	var util = require('util');
	var baseGrid	= require('@base/grid').baseNoDate;

	var Base = baseGrid.extend({
		init: function(config){
			config = pubjs.conf(config, {
				'cols': [
					//{'type':'select', 'name':'sel', 'all':1, width:50}
					{"type":"id"}
					,{"name": "CountryNameCn","text":LANG("国家"),"type":"index","width":210, render: 'renderCountry'}
					,{"name": "CityNameCn","text":LANG("城市"),"type":"index", render: 'renderCity'}
					,{"name": "RegionNameCn","text":LANG("省份"),"type":"index","width":210, render: 'renderRegion'}
					,{"name": "Icon","text":LANG("图标"),"type":"index", render: 'renderIcon'}
					,{type: "op", html:'<a data-op="edit" title="'+LANG("编辑此条记录")+'">'+LANG("编辑")+'</a>'}
				]
				,"opClick": true
				,'hasSearch': false
				,'hasTab': false
				,'hasExport': false
				,'hasAmount': false
				,'hasRefresh': true
				,'url': 'map/list'
				,'sub_field': '_id'
				,'reqType': 'websocket'
				,'pager': {'size':10}
				,'param' :{
					'noAmount': true
				}
			});

			this.Super('init', arguments);
		}
		,renderCountry: function(i, val, data) {
			return val || data.CountryName || '-';
		}
		,renderCity: function(i, val, data) {
			return val || data.CityName || '-';
		}
		,renderRegion: function(i, val, data) {
			return val || data.RegionName || '-';
		}
		,renderIcon: function(i, val) {
			var html = [
				'<div>',
				'<img class="fl" src="/resources/images/geo/'+(val||'unknown')+'.png" />',
				'</div>'
			].join('');

			return $(html).width(150);
		}
	});

	exports.base = Base;

});